package com.hksj.Intelligentmanagement.service;

import com.hksj.Intelligentmanagement.mapper.CockpitScreenMapper;
import com.hksj.Intelligentmanagement.vo.SurgicalInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @ClassName CockpitScreenService
 * @Description TODO
 * @Author @陈章
 * @Date 2023/5/5 15:53
 * @Version 1.0
 */
@Service
public class CockpitScreenService {

    @Autowired
    private CockpitScreenMapper cockpitScreenMapper;

    public Map todaySurgicalVolume() {
        Map map = cockpitScreenMapper.todaySurgicalVolume();
        return map;
    }

    public Map<String, Object> queryListSurgeryToBeScheduled() {
        //待排班手术内容
        List<SurgicalInfoVo> list = cockpitScreenMapper.queryListSurgeryToBeScheduled();
        //待排班手术量
        int i = cockpitScreenMapper.selectSurgeryToBeScheduledCount();
        Map<String, Object> map = new HashMap();
        map.put("count", i);
        map.put("list", list);
        return map;
    }

    public List<Map<String, Object>> rankingOfSurgeons(String type) {
        List<Map<String, Object>> list=cockpitScreenMapper.rankingOfSurgeons(type);
        return list;
    }
}
